Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable automatic eviction of diskcache at aggregation #419

Merged
merged 1 commit into from
May 19, 2023

Conversation

jaemin-shin
Copy link
Collaborator

Python diskcache, which we use for aggregating trainer updates, have its own automatic eviction policy, depending on its size_limit and cull_limit value. Updated it to disable automatic eviction, and added a logger debug line that tells you the number of updates in the cache.

Description

Please provide a meaningful description of what this change will do, or is for. Bonus points for including links to
related issues, other PRs, or technical references.

Note that by not including a description, you are asking reviewers to do extra work to understand the context of this
change, which may lead to your PR taking much longer to review, or result in it not being reviewed at all.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2023

Codecov Report

Merging #419 (83b1e52) into main (e328ebf) will not change coverage.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##             main     #419   +/-   ##
=======================================
  Coverage   14.86%   14.86%           
=======================================
  Files          48       48           
  Lines        2832     2832           
=======================================
  Hits          421      421           
  Misses       2382     2382           
  Partials       29       29           

myungjin
myungjin previously approved these changes May 19, 2023
Copy link
Contributor

@myungjin myungjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one question left; overall lgtm

self.cache = Cache()
self.cache.reset('size_limit', 1e15)
self.cache.reset('cull_limit', 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the only place we have to change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad. Applied changes to where it should be.

Python diskcache, which we use for aggregating trainer updates, have its
own automatic eviction policy, depending on its size_limit and
cull_limit value. Updated it to disable automatic eviction, and added a
logger debug line that tells you the number of updates in the cache.
Copy link
Contributor

@myungjin myungjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jaemin-shin jaemin-shin merged commit f14b5b3 into cisco-open:main May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants